﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;

public class CompassTestScript : MonoBehaviour
{
    void Start()
    {
        Input.compass.enabled = true;
        Input.location.Start();
    }

    void Update()
    {
        var text = GetComponent<Text>();
        if (text != null) text.text = Input.compass.trueHeading.ToString();
    }
}
